package com.cqw.vo.order;

import com.cqw.order.enums.SpuStateEnum;
import com.cqw.validate.Add;
import com.cqw.validate.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Author: caoqingwen
 * @CreateTime: 2021-07-12 17:59
 * @Description:
 */
@Data
@NoArgsConstructor
public class SpuReq {

    @ApiModelProperty(value = "id")
    @NotNull(message = "id不能为空", groups = {Update.class})
    private Long id;

    @ApiModelProperty(value = "shopId店铺id")
    private Long shopId;

    @ApiModelProperty(value = "spuName商品名称")
    @NotBlank(message = "商品名称不能为空", groups = {Add.class, Update.class})
    private String spuName;

    @ApiModelProperty(value = "itemId商品分类id")
    @NotNull(message = "商品分类id不能为空", groups = {Add.class, Update.class})
    private Long itemId;

    @ApiModelProperty(value = "title商品主标题")
    private String title;

    @ApiModelProperty(value = "subTitle商品副标题")
    private String subTitle;

    @ApiModelProperty(value = "spuPic商品轮播图，逗号分割")
    private String spuPic;

    @ApiModelProperty(value = "spuImg商品详情图，逗号分割")
    private String spuImg;

    @ApiModelProperty(value = "soldNum销量")
    private Integer soldNum;

    @ApiModelProperty(value = "totalStocks总库存")
    private Integer totalStocks;

    @ApiModelProperty(value = "state0已删除，1未上架，2已上架")
    private SpuStateEnum state;

    @ApiModelProperty(value = "onLineTime上架时间")
    private Date onLineTime;

    @ApiModelProperty(value = "createTime创建时间")
    private Date createTime;

    @ApiModelProperty(value = "updateTime修改时间")
    private Date updateTime;

    @ApiModelProperty(value = "description商品详情")
    private String description;


}
